package com.kaifamiao.demo.d0809.ex;

public class Demo02 {


    public static void main(String[] args) {
        int a = num(0);
        System.out.println(a);
    }


    public static int num(int a){
        try{
            int result = 10 / a;
            return result;
        } catch (ArithmeticException e){
            return 0;
        } finally {
            return 1;
        }
    }
}
